/**
 * @author 艾尼亚尔
 * @date 2025/8/18
 * @description
 */
import type {PropType} from 'vue';
import {NDataTable} from 'naive-ui';
import type {DataTableColumn} from 'naive-ui';

export const customProps = {
  ...NDataTable.props, // 这里继承原 UI 组件的 props
  //以下自定义props
  titles: {
    type: String,
    default: null,
  },
  titleTooltip:{
    type: String,
    default: null,
  },
  size: {
    type: String,
    default: 'small',
  },
  actionColumn: {
    type: Object as PropType<DataTableColumn>,
    default: null,
  },
  emptyText: {
    type: String,
    default: '暂无相关数据',
  },
  loadingText:{
    type: String,
    default: '数据加载中...',
  },
  pagination: {
    type: [Object as PropType<{
      pageSize?: number;
      pageSizes?: number[];
    }>, Boolean],
    default: () => {
    },
  },
  methods: {
    type: String,
    default: "GET",
  },
  params: {
    type: [Object as PropType<string | unknown>],
    default: () => {
    },
  },
  url: {
    type: String,
    default: null,
  },
  //是显示选择框
  defaultSelection: {
    type: Boolean,
    default: false,
  },
  //是否默认显示序号
  defaultSerialNumber: {
    type: Boolean,
    default: false,
  },
  //序号标题
  serialNumberTitle: {
    type: String,
    default: "No.",
  },
  singleLine:{
    type: Boolean,
    default: true,
  },
  rowKeyColumn:{
    type: String,
    default: null,
  },
  subHeight:{
    type: Number,
    default: 100,
  }
}
